<template>
    <div style="margin-left:30px">
        <div id="top">
        个人基本信息
        </div>
        <el-form  label-position="left"   label-width="80px" :inline="true"  class="demo-form-inline">
        
            <el-form-item label="用户名">
                <el-input style="width:500px" :value="params.propertyList.user.uname"  readonly="readonly" ></el-input>
            </el-form-item>

            <el-form-item label="真实姓名">
                <el-input style="width:500px" :value="params.propertyList.user.trueName"  readonly="readonly"></el-input>
            </el-form-item>
    

            <el-form-item label="年龄" >
                <el-input style="width:500px" :value="params.propertyList.user.uage"  readonly="readonly" ></el-input>
            </el-form-item>
            <el-form-item label="身份证号">
                <el-input style="width:500px" :value="params.propertyList.user.uidcard"  readonly="readonly"></el-input>
            </el-form-item>
    
            <el-form-item label="用户电话">
                <el-input style="width:500px" :value="params.propertyList.user.uphone"  readonly="readonly"></el-input>
            </el-form-item>

            <el-form-item label="驾驶证" >
                <el-input style="width:500px" :value="params.propertyList.user.udrivingLicence"  readonly="readonly" ></el-input>
            </el-form-item>

            <el-form-item label="所属物业公司" >
                <el-link href="javascript:void(0)" onclick="componey()"  :underline="false" type="primary">{{params.propertyList.property.propertyName}}</el-link>
            </el-form-item>      
        </el-form>  


        <div id="top">
            拥有的车位信息
        </div >
            <el-table
            :data="params.propertyList.parkingInformationList"
            style="width: 100%"
            stripe>
            <el-table-column
            prop="parkingAddress"
            label="车位地址"
            width="280px">
            </el-table-column>
            <el-table-column
            prop="parkingStatus"
            label="车位状态"
            :formatter="formatter"
            width="280px">
            </el-table-column>
            <el-table-column
            prop="parkingProportion"
            label="车位分成比例"
            width="380px">
            </el-table-column>
            
        </el-table>

        
    </div>
    
</template>



<script>
export default {
    name:"propertyDetail",
    props:['params'], 
    data(){
        return{
        
        }
    },
    mounted(){
    },
    methods:{
          
        componey(){
            console.log("2321")
            alert("3333");
        },
        formatter(row){
            if(row.parkingStatus==0){
                return "停用";
            }else if(row.parkingStatus==1){
                return "个人私有";
            }else if(row.parkingStatus==2){
                return "待出租";
            }else if(row.parkingStatus==3){
                return "已出租";
            }else if(row.parkingStatus==4){
                return "查封";
            }
        },
             
    },
     filters:{
      dateFormat(dataStr){
        var dt = new Date(dataStr)
        var y = dt.getFullYear()
        var m = dt.getMonth()
        if(m<10){
           m="0"+m
        }
        var d = dt.getDate()
        if(d<10){
           d="0"+d
        }
        var hh = dt.getHours()
        var mm = dt.getMinutes()
        var ss = dt.getSeconds()
        if(hh<10){
           hh="0"+hh
        }
        if(mm<10){
           mm="0"+mm
        }
        if(ss<10){
           ss = "0"+ss
        }
        return y+"-"+m+"-"+d+"  "+hh+":"+mm+":"+ss
      }
    }
   
}
</script>


<style scoped>
   .el-table .warning-row {
    background: oldlace;
  }

  .el-table .success-row {
    background: #f0f9eb;
  }

  #top{
      margin-top: 20px;
      margin-bottom:20px;
  }
</style>






